//
//  ClassContentCollectionViewCell.m
//  LiangYa_BObject
//
//  Created by dllo on 15/10/30.
//  Copyright © 2015年 YuHao. All rights reserved.
//

#import "ClassContentCollectionViewCell.h"

@implementation ClassContentCollectionViewCell

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        self.imageV = [[UIImageView alloc] init];
        [self addSubview:_imageV];
        
        self.content = [[NightLabel alloc] init];
        _content.font = [UIFont systemFontOfSize:15];
        _content.numberOfLines = 2;
        [self addSubview:_content];
        
        self.price = [[UILabel alloc] init];
        _price.textColor = [UIColor colorWithRed:1.000 green:0.067 blue:0.121 alpha:1.000];
        [self addSubview:_price];
        
        self.soldNum = [[GrayLabel alloc] init];
        _soldNum.font = [UIFont systemFontOfSize:12];
//        _soldNum.textColor = [UIColor grayColor];
        [self addSubview:_soldNum];
        
        
    }
    return self;
}

- (void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    [super applyLayoutAttributes:layoutAttributes];
    
    _imageV.frame = CGRectMake(0, 0, cellWidth, 120);
    _content.frame = CGRectMake(0, 125, cellWidth, 40);
    _price.frame = CGRectMake(0, 170, 80, 20);
    _soldNum.frame = CGRectMake(80, 170, 80, 20);
}

@end
